home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / TO-2.BAS < prev    next >
BASIC Source File  |  1989-08-31  |  450b  |  20 lines

  1. ' TO-2.BAS
  2. ' This program demonstrates the TO keyword in a CASE clause.
  3.  
  4. CLS
  5.  
  6. INPUT "Please enter a name:  ", name$
  7. PRINT
  8.  
  9. SELECT CASE name$
  10.     CASE "a" TO "mz"
  11.         PRINT "The name is in the range a to m."
  12.     CASE "n" TO "z"
  13.         PRINT "The name is in the range n to z."
  14.     CASE "A" TO "Mz"
  15.         PRINT "The name is in the range A to M."
  16.     CASE "N" TO "Z"
  17.         PRINT "The name is in the range N to Z."
  18. END SELECT
  19.  
  20.